<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="app">
    {{msg|toUpperCaseString}}
    <hr/>
    {{price|formatPrice("$")}}
</div>

<!--引入vue文件-->
<script type="text/javascript" src="js/vue-2.6.12.js"></script>
<script>
    const v=new Vue({
        el:"#app",
        data:{
            msg:"hello world",
            price:200,
            bir:new Date()
        },
        filters:{
            toUpperCaseString(value){
                return value.toUpperCase();
            },
            formatPrice(price,flag){
                return flag+" "+price;
            }
        }
    });

</script>
</body>
</html>